
package robotinterface.list.listeners;

import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;


/**
 *
 * @author Brian Bailey
 */
public class EntryDataListener implements ListDataListener {

    @Override
    public void intervalAdded( ListDataEvent e )
    {
//        RobotListModel source = (RobotListModel) e.getSource();
//        System.out.println("Added: "+e);
//        printEvent(e);
    }

    @Override
    public void intervalRemoved( ListDataEvent e )
    {
//         RobotListModel model = (RobotListModel) e.getSource();
//         System.out.println("Remove: "+e);
//         printEvent(e);
    }

    @Override
    public void contentsChanged( ListDataEvent e )
    {
//         RobotListModel model = (RobotListModel) e.getSource();
//         System.out.println("Changed: "+e);
//         printEvent(e);
    }

    private void printEvent( ListDataEvent e)
    {
//        int firstIndex = e.getIndex0();
//        int lastIndex = e.getIndex1();
//        int count = lastIndex - firstIndex + 1;
//        System.out.println("Event for indexes "+ firstIndex + " - " + lastIndex + "  size: "+count);
    }

}
